<?php
$language = $this->session->userdata('ua_language');
$this->lang->load('headers', $language);
?>
    <div id="categories" class="clearfix">
    			
        <h2><?php echo $this->lang->line('headers_all_categories');?></h2>
		
		<?php
		
			foreach($categories as $row => $category):
			
			$class = ( ! $category->entry_count > 0) ? 'categories empty' : 'categories';			
			$count = ' <small>('.$category->entry_count.')</small>';
			
		?>
	
    	<dl class="<?=$class?>" id="cat_<?=$category->category_id?>">
    	    <?php if( $this->session->userdata('ua_language')=='greek'):?>
            <dt><?=anchor('listings/category/'.$category->category_id, $category->name_gr, array('title' => character_limiter($category->description, 40))).$count?></dt>
    	    <?php else : ?>
            <dt><?=anchor('listings/category/'.$category->category_id, $category->name, array('title' => character_limiter($category->description, 40))).$count?></dt>
                        <?php endif;?>
            <dd><?=$category->description?></dd>
    	</dl>
    	<?php endforeach; ?>
		
	</div>